home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / clprnt23.zip / CL-PRINT.ASM next >
Assembly Source File  |  1992-03-12  |  52KB  |  985 lines

  1. ;             CL-Print.asm;
  2. CR             Equ  13
  3. LF             Equ  10
  4. BELL           Equ  7
  5. TAB            Equ  9
  6. SWITCH         Equ  '/'
  7.  
  8. CODE SEGMENT                           ;*************************
  9. ASSUME CS:CODE,DS:CODE                 ;*                       *
  10.                Org 100H                ;*  REMEMBER TO EXE2BIN  *
  11.                                        ;*                       *
  12. Start:         Jmp    Beginning        ;*************************
  13.  
  14.  
  15. ;              Data Area
  16. ;              ---------
  17.  
  18. Copyright$     DB  CR,LF,'CL-Print Ver 2.30 - '
  19.                DB  'Copyright 1991,1992 Gary Meeker',CR,LF,'"'
  20. Comment$       DB     62 DUP (' '), CR, LF, 1AH
  21. Quote2$        DB  '"=>$'
  22. File_Start     DW  ?                            ;Points to Asciiz Filename
  23. Quiet          DB  0FFH                         ;0=Quiet, -1=Copyright Display
  24. NoAppend       DB  0FFH                         ;0=No Append, -1=Append
  25. Close_It       DB  0FFH                         ;0=write 62 *'s
  26. Usage_Msg      DB  BELL,CR,LF
  27.                DB  'Usage:  CL-PRINT filespec "logstring"',CR,LF,LF
  28.                DB  ' String must be in quotes or decimal ASCII - '
  29.                DB  'Seperate multiple codes by commas.',CR,LF,LF
  30.                DB  ' e.g. CL-PRINT C:\PCB\CALLER /S,"Scheduled Event Ended /A"'
  31.                DB  CR,LF,LF,TAB,'/A = " at MM-DD-YY HH:MM:SS"',CR,LF
  32.                DB  TAB,'/D = "MM-DD-YY"',CR,LF
  33.                DB  TAB,'/L = "MM-DD-YY (HH:MM)"',CR,LF
  34.                DB  TAB,'/S = 6 spaces',CR,LF
  35.                DB  TAB,'/T = "HH:MM"',CR,LF
  36.                DB  TAB,'/* = row of *',CR,LF
  37.                DB  TAB,'/Q = No console output',CR,LF
  38.                DB  TAB,'/N = Create NEW file'
  39. CrLf$          DB  CR,LF,'$'
  40. NoUser$        DB  BELL,CR,LF,'No User Online!',CR,LF,'$'
  41.  
  42. PCBDrive       DB  'PCBDRIVE='
  43. LenPCBDrive    EQU $ - PCBDrive
  44.  
  45. PCBDir         DB  'PCBDIR='
  46. LenPCBDir      EQU $ - PCBDir
  47.  
  48. PCBoardSys$    DB  'PCBOARD.SYS',0
  49. PCBoardDat$    DB  'PCBOARD.DAT',0
  50.  
  51. Not_Found2     DB  ' - File not found! ',CR,LF,'$'
  52. Not_Found3     DB  ' - Path not found! ',CR,LF,'$'
  53. No_Handle      DB  ' - No handles left!',CR,LF,'$'
  54. No_Access      DB  ' - Access Denied!',CR,LF,'$'
  55. Unknown        DB  ' - Unknown Error!',CR,LF,'$'
  56. ReadError$     DB  ' - Error reading file!',CR,LF,'$'
  57. ASCIIZ$        DB  ' '
  58.  
  59. ;              Code Area
  60. ;              ---------
  61.  
  62. ;-------------------------------------------------------;
  63. ; First we will parse the filename and the string.      ;
  64. ;-------------------------------------------------------;
  65.  
  66. Beginning:     Mov    DX,OFFSET Usage_Msg    ;Point to syntax message.
  67.                Cld                           ;Move in forward direction.
  68.                Mov    AX,DS                  ;Point ES to DS
  69.                Mov    ES,AX
  70.                Mov    SI,80H                 ;Point to parameters.
  71.                Mov    DI,81H                 ;Point DI for SCASB
  72.                Mov    AL,'@'                 ;See if any @ Variables exist
  73.                Xor    CH,CH                  ;Get Command Line
  74.                Mov    CL,[SI]                ;  Length in CX
  75.                Jcxz   ErrorExit              ;Nevermind if no parameters
  76.                Repne  Scasb                  ;Do we have any @ variables
  77.                Jne    No_Read                ;Nope, None found
  78.                Call   ReadFile               ;Yep, Read PCBoard files into
  79.                Jc     ErrorExit              ;  buffers, oops Error occured
  80. No_Read:       Mov    DI,OFFSET Comment$     ;Point to comment string storage.
  81.                Xor    CX,CX                  ;Set string counter to zero.
  82.                Call   Space                  ;Parse leading spaces.
  83.                Mov    File_Start,SI          ;We now point to filename.
  84.  
  85. File_Byte:     Cmp    BYTE PTR [SI],CR       ;Is it a carriage return?
  86.                Jz     ErrorExit              ;If yes, exit with syntax error.
  87.                Cmp    BYTE PTR [SI],' '      ;Is it a space?
  88.                Jz     Asciiz                 ;If yes, end of filename
  89.                Inc    SI                     ; else, point to next byte
  90.                Jmp    File_Byte              ; and check it.
  91.  
  92. OpenError:     Call   File_Error             ;Show what type of Error
  93. ErrorExit:     Call   Display
  94.                Mov    AX,4C01H
  95.                Int    21H                    ; and terminate.
  96.  
  97. Asciiz:        Mov    BYTE PTR [SI],0        ;Make filename into ASCIIZ.
  98.  
  99.                Call   Space                  ;Parse the spaces.
  100. String_Byte:   Call   String                 ;Get string.
  101.                Cmp    BYTE PTR [SI],CR       ;Are we now pointing to CR?
  102.                Jz     Open_File              ;If yes, we are done here
  103.                Inc    SI                     ; else point to next byte
  104.                Cmp    CX,62                  ;Maximum Length?
  105.                Jl     String_Byte            ; No, get rest of string.
  106.  
  107. ;------------------------------------------;
  108. ; OK, Open file and seek to the end of it. ;
  109. ;------------------------------------------;
  110.  
  111. Open_File:     Push   CX                     ;Save length
  112.                Mov    DX,File_Start          ;Point to ASCIIZ filename
  113.                Cmp    NoAppend, 0            ;Is it NoAppend mode?
  114.                Je     Create_File            ;Yes, Just create it!
  115.                Mov    AX,3D41H               ; Open file for writing.
  116.                Int    21H
  117.                Jnc    Open2                  ;OK if no error
  118.                Cmp    AX,2                   ;Was it NOT FOUND?
  119.                Jne    OpenError              ;  No, Report the error
  120. Create_File:   Mov    AH,3CH                 ;  Yes, Create File
  121.                Xor    CX,CX                  ;       Normal Attribute
  122.                Int    21H
  123.                Jc     OpenError              ;Report the error
  124.  
  125. Open2:         Mov    BX,AX                  ;File Handle to BX
  126.                Mov    AX,4202H               ;No, Move File Pointer
  127.                Xor    CX,CX                  ; Zero offset
  128.                Xor    DX,DX                  ;  from end of file (CX:DX = 0)
  129.                Int    21H
  130.                Pop    CX
  131.  
  132. ;------------------------------------------------;
  133. ; We are ready to write the comment to the file. ;
  134. ;------------------------------------------------;
  135.  
  136. Write:         Jcxz   Skip_Write
  137.                Mov    DX,OFFSET Comment$     ;Point to COMMENT$
  138.                Jmp    SHORT Write_Close      ;Write the comment
  139. Make_Close:    Call   Do_Close               ;Fill the Buffer
  140. Write_Close:   Mov    CX,64                  ;64 Bytes to write
  141.                Mov    AH,40H                 ; and write comment.
  142.                Int    21H
  143. Skip_Write:    Cmp    Close_It,0FFH          ;Do we need a row of *,s
  144.                Jne    Make_Close             ;yes
  145.                Mov    AH,3EH                 ;No,close file.
  146.                Int    21H
  147.                Cmp    Quiet,0FFh             ;Quiet Mode
  148.                Jne    QExit                  ;Yes, So Exit
  149.                Mov    Comment$+62,'$'        ;No, prepare the Comment
  150.                Mov    DX,OFFSET Copyright$   ;Point to Copyright message
  151.                Call   Display
  152.                Mov    DX,OFFSET Quote2$      ;Print trailing Quote & Arrow
  153.                Call   Display
  154.                Mov    SI,File_Start          ;Point to File Name
  155.                Call   DisplayText
  156.  
  157. ;------------------------------------------;
  158. ; The exit is placed in the middle of code ;
  159. ; so it can be reached by short jumps.     ;
  160. ;------------------------------------------;
  161.  
  162. Exit2:         Mov    DX,OFFSET CrLf$
  163. Exit:          Call   Display
  164. QExit:         Mov    AX,4C00H
  165.                Int    21H                    ; and terminate.
  166.  
  167. File_Error:    Mov    DX,OFFSET Not_Found2
  168.                Cmp    AX,2
  169.                Je     Error_Ret
  170.                Mov    DX,OFFSET Not_Found3
  171.                Cmp    AX,3
  172.                Je     Error_Ret
  173.                Mov    DX,OFFSET No_Handle
  174.                Cmp    AX,4
  175.                Je     Error_Ret
  176.                Mov    DX,OFFSET No_Access
  177.                Cmp    AX,5
  178.                Je     Error_Ret
  179.                Mov    DX,OFFSET Unknown
  180. Error_Ret:     Ret
  181.  
  182. ;---------------------------------------;
  183. ; This subroutine will use DOS function ;
  184. ; to print string terminated by '$'     ;
  185. ;---------------------------------------;
  186.  
  187. Display:       Mov    AH,9                   ;Display message
  188.                Int    21H                    ;
  189.                Ret                           ;
  190.  
  191.  
  192. ;---------------------------------------------;
  193. ; This subroutine will get the quoted string  ;
  194. ; or convert the decimal ASCII to hexadecimal ;
  195. ; and store in the appropriate storage area.  ;
  196. ;---------------------------------------------;
  197.  
  198. String:        Mov    AH,[SI]                ;Get a character
  199.                Cmp    AH,'"'                 ;Is it double quotes?
  200.                Jz     Got_Quote              ;Yes -
  201.                Cmp    AH,"'"                 ;No  - Is it single quotes?
  202.                Jnz    Number                 ;If no, must be number
  203. Got_Quote:     Inc    SI                     ; else, point to first string
  204. Next_String:   Lodsb                         ; byte and retrieve.
  205.                Cmp    AL,CR                  ;Is it carriage return?
  206.                Jz     Exit                   ;If yes, syntax error; exit.
  207.                Cmp    AL,SWITCH              ;Is it a Switch character
  208.                Jz     Is_Switch              ;Yes
  209.                Cmp    AL,'@'                 ;No, Is it a Var Subst Char?
  210.                Jnz    Not_switch             ;No,
  211. Is_Switch:     Call   Substitute             ;Yes, Substitute
  212.                Jnc    Next_2                 ; If Not carry then continue
  213.                Ret                           ; else done
  214. Not_Switch:    Cmp    AL,AH                  ;Is it a matching quotes?
  215.                Jnz    Store                  ;If no, store the byte
  216.                Call   Delimiter              ; else, see if delimiter
  217.                Jnc    Store                  ; and store the quote if part
  218.                Ret                           ; of string else, we are done.
  219.  
  220. Store:         Stosb                         ;Store the byte
  221.                Inc    CX                     ; increment byte count
  222. Next_2:        Cmp    CX,62                  ;Maximum length?
  223.                Jl     Next_String            ; no, get next string byte
  224.                Ret                           ; yes, then return
  225.  
  226. ;-------------------------------;
  227. ; This routine converts Decimal ;
  228. ; Ascii number to charcater and ;
  229. ; places it in Comment$         ;
  230. ;-------------------------------;
  231.  
  232. Number:        Xor    BL,BL                  ;Zero into hex counter.
  233.                Cmp    AH,Switch              ;Was it a Switch character?
  234.                Jz     Is_Switch2             ;Yes
  235.                Cmp    AH,'@'                 ;No, Is it a Var Subst char?
  236.                Jnz    Get_Number             ;No, must be a number
  237. Is_Switch2:    Inc    SI                     ;Yes, Skip the Switch Char
  238.                Mov    AL,AH                  ;Copy Switch to AL
  239.                Jmp    SHORT Substitute       ;Do the substitute
  240. Get_Number:    Call   Delimiter              ;Is it a delimiter?
  241.                Jnc    Load_Number            ;If no, get next decimal number
  242.                Mov    AL,BL                  ; get hex byte
  243.                Stosb                         ; and store
  244.                Inc    CX                     ; increment byte count
  245.                Ret                           ; yes, then return
  246. Jump2Exit:     Jmp    Exit
  247.  
  248. Load_Number:   Lodsb                         ;Get the decimal number
  249.                Cmp    AL,'0'                 ;Is it between 0 and 9?
  250.                Jb     Jump2Exit              ;If no, syntax error
  251.                Cmp    AL,'9'
  252.                Ja     Jump2Exit
  253.                Sub    AL,30H                 ; else, convert to hex
  254.                Mov    BH,AL                  ; and save
  255.                Mov    AL,10                  ; multiply by ten
  256.                Mul    BL                     ; to shift place left
  257.                Mov    BL,AL
  258.                Add    BL,BH                  ; add new number
  259.                Jmp    Get_Number             ; and get next decimal number.
  260.  
  261. ;------------------------------------------------;
  262. ; This subroutine converts '/' variables to      ;
  263. ; their values and stuffs Comment$               ;
  264. ;------------------------------------------------;
  265.  
  266. Substitute:    Push   AX                     ;Save Quote
  267.                Mov    AH,AL                  ;Save the switch
  268.                Lodsb                         ;Get the next Character
  269.                Cmp    AL,'a'                 ;Lower Case?
  270.                Jb     S1                     ;No,
  271.                Cmp    AL,'z'                 ;Maybe, let's see
  272.                Ja     S1                     ;No,
  273.                Sub    AL,20h                 ;Yes, convert to Upper Case
  274. S1:            Cmp    AH,Switch              ;Is it a switch or Var Subst?
  275.                Je     Do_Switch              ;It was a Switch?
  276.                Jmp    VarSub                 ;No, It was a Var Subst?
  277. Do_Switch:     Cmp    AL,'Q'                 ;Is it QUIET Switch?
  278.                Je     Set_Quiet              ;Yes (Carry is Cleared)
  279.                Cmp    AL,'N'                 ;Is NoAppend mode?
  280.                Je     Set_NoAppend           ;Yes, (Carry is Cleared)
  281.                Cmp    AL,'*'                 ;No, Is it CLOSED Var?
  282.                Je     Set_Closed             ;Yes (Carry is Cleared)
  283.                Cmp    AL,'Z'                 ;Is it a ASCIIZ var?
  284.                Je     Set_ASCIIZ             ;Yes, Carry is Cleared
  285.                Cmp    AL,CR                  ;Is it CR?
  286.                Je     Jump2Exit              ;If yes, syntax error; exit.
  287.                Mov    BX,DI                  ;Save COMMENT$ Pointer
  288.                Mov    DI,OFFSET DatBuffer    ;Point to Buffer
  289.                Cmp    AL,'T'                 ;Is it TIME var?
  290.                Je     Stuff_Time             ;Yes, and Carry is Clear
  291.                Cmp    AL,'D'                 ;Is it DATE Var?
  292.                Je     Stuff_Date             ;No,
  293.                Cmp    AL,'A'                 ;Maybe, let's see
  294.                Jnz    S2                     ;No,
  295.                Mov    AX,'a '                ;Yes, Set ' at ' in Buffer
  296.                Stosw                         ;
  297.                Mov    AX,' t'                ;
  298.                Stosw                         ;
  299.                Call   Do_Date                ;add Date to Buffer
  300.                Mov    AL,' '                 ;add ' '
  301.                Stosb                         ;
  302.                Stc                           ;We want seconds too
  303. Stuff_Time:    Call   DO_Time                ;add Time to Buffer
  304.                Jmp    SHORT Stuff_It
  305. S2:            Cmp    AL,'L'                 ;Is it LOGON Var?
  306.                Jne    S3                     ;No,
  307.                Call   Do_Date                ;Yes, Set Date in Buffer
  308.                Mov    AX,'( '                ; add ' ('
  309.                Stosw                         ;
  310.                Clc                           ;We don't want seconds
  311.                Call   Do_Time                ;add Time to Buffer
  312.                Mov    AL,')'                 ; add ')'
  313.                Stosb                         ;
  314.                Jmp    SHORT Stuff_It
  315. S3:            Cmp    AL,'S'                 ;Is it SPACES var?
  316.                Jne    S4                     ;No,
  317.                Mov    AX,'  '                ;Yes, Set six spaces in Buffer
  318.                Stosw                         ;
  319.                Stosw                         ;
  320.                Stosw                         ;
  321.                Jmp    SHORT Stuff_It
  322. S4:            Mov    DI,BX                  ;restore Comment$ pointer
  323.                Stosb                         ;just store it
  324.                Inc    CX                     ;count it
  325.                Clc                           ;
  326.                Pop    AX                     ;Restore Quote
  327.                Ret
  328.  
  329. Set_ASCIIZ:    Mov    BYTE PTR ASCIIZ$,0     ;Set 0 in ASCIIZ$
  330.                Pop    AX                     ;Restore Quote
  331.                Ret                           ;Done - Carry Clear
  332. Set_Quiet:     Mov    BYTE PTR Quiet,0       ;Show Quiet mode
  333.                Pop    AX                     ;Restore Quote
  334.                Ret                           ;Done - Carry Clear
  335. Set_NoAppend:  Mov    BYTE PTR NoAppend,0    ;Show NoAppend mode
  336.                Pop    AX                     ;Restore Quote
  337.                Ret                           ;Done - Carry Clear
  338. Set_Closed:    Mov    BYTE PTR Close_It,0    ;Show Closed mode
  339.                Pop    AX                     ;Restore Quote
  340.                Ret                           ;Done - Carry Clear
  341.  
  342. Stuff_Date:    Call   Do_Date                ;Yes, Set Date in Buffer
  343. Stuff_It:      Xor    AL,AL                  ;Zero marks end of data
  344.                Stosb                         ;
  345.                Mov    DI,BX                  ;resore Comment$ pointer
  346.                Mov    BX,SI                  ;Save Command Line pointer
  347.                Mov    SI,OFFSET DatBuffer    ;Point to Buffer
  348. Stuff_More:    Lodsb                         ;Get character from Buffer
  349.                Or     AL,AL                  ;End of data
  350.                Jz     Done_Stuff             ;Yes,
  351.                Stosb                         ;Copy to Comment$
  352.                Inc    CX                     ;Count it
  353.                Cmp    CX,62                  ;Maximum Length?
  354.                Jl     Stuff_More             ;No - Continue
  355.                Stc                           ;Yes - Indicate that
  356. Done_Stuff:    Mov    SI,BX                  ;Restore Command Line pointer
  357.                Pop    AX                     ;Restore Quote
  358.                Ret                           ;All done
  359.  
  360. ;------------------------------------------;
  361. ; This subroutine Reads Date and stuffs    ;
  362. ; buffer with information (uses part of    ;
  363. ; Do_Time routine)                         ;
  364. ;------------------------------------------;
  365.  
  366. Do_Date:       Push   BX             ;Save BX
  367.                Push   CX             ;Save Length
  368.                Push   DX             ;Save Message Pointer
  369.                Mov    AH,04H         ;Get date service
  370.                Int    1AH            ;Call BIOS - return codes as follows:
  371.                                      ;CH = Century (19-20)  CL = Year (00-99)
  372.                                      ;DH = Month   (1-12)   DL = Day  (00-31)
  373.                Mov    AL,DH          ;Month
  374.                Call   ASCII          ;Convert byte to ASCII digits
  375.                Mov    AL,'-'         ;
  376.                Stosb                 ;
  377.                Mov    AL,DL          ;Day
  378.                Call   ASCII          ;Convert byte to ASCII digits
  379.                Mov    AL,'-'         ;
  380.                Stosb                 ;
  381.                Mov    AL,CL          ;Year
  382.                Jmp    SHORT Skip_Seconds
  383.  
  384. ;------------------------------------------;
  385. ; This subroutine Reads Time and stuffs    ;
  386. ; buffer with information                  ;
  387. ;------------------------------------------;
  388.  
  389. Do_Time:       Push   BX             ;Save BX
  390.                Push   CX             ;Save Length
  391.                Push   DX             ;Save Message Pointer
  392.                PushF                 ;Save Flags
  393.                Mov    AH,02H         ;Get time service
  394.                Int    1AH            ;Call BIOS - return codes as follows:
  395.                                      ;CH = Hours   (0-23)   CL = Minutes (0-59)
  396.                                      ;DH = Seconds (0-59)
  397.                Mov    AL,CH          ;Hours
  398.                Call   ASCII          ;Convert byte to ASCII digits
  399.                Mov    AL,':'         ;
  400.                Stosb                 ;
  401.                Mov    AL,CL          ;Minutes
  402.                PopF                  ;Restore Flags
  403.                Jnc    Skip_Seconds   ;Skip the Seconds if No Carry
  404.                Call   ASCII          ;Convert byte to ASCII digits
  405.                Mov    AL,':'         ;
  406.                Stosb                 ;
  407.                Mov    AL,DH          ;Seconds
  408. Skip_Seconds:  Pop    DX             ;Restore Message Pointer
  409.                Pop    CX             ;Restore Length
  410.                Pop    BX             ;Restore BX
  411. ASCII:         Mov    AH,AL          ;Need to get BCD Digits
  412.                Shr    AL,1           ; MSD in AL
  413.                Shr    AL,1           ;  lower
  414.                Shr    AL,1           ;    4
  415.                Shr    AL,1           ;    Bits
  416.                And    AH,0FH         ;And LSD in AH cleanly
  417.                Or     AX,3030H       ;Convert to ASCII
  418.                Stosw                 ;Stuff Digits into Buffer (in reverse)
  419.                Ret                   ;SI Points to String Data
  420.  
  421. ;--------------------------------------------;
  422. ; This subroutine will translate @ variables ;
  423. ; to data read from PCBOARD.SYS & USERS file ;
  424. ;--------------------------------------------;
  425.  
  426. VarSub:        Push   DI                     ;Save Comment$ pointer
  427.                Mov    BX,OFFSET SUB_TABLE    ;Point to Variable List
  428.                Mov    DI,OFFSET DatBuffer    ;Point to Buffer
  429. NextVar:       Mov    AH,[BX]                ;Get a letter from table
  430.                Or     AH,AH                  ;End of table?
  431.                Jz     NoSub                  ;Yes, no match then
  432.                Cmp    AH,AL                  ;No,  Is this our Letter?
  433.                Jz     GotIt                  ;     Yes,
  434.                Add    BX,4                   ;     No, Bump the pointer
  435.                Jmp    NextVar                ;         Next Variable
  436. GotIt:         Mov    AX,[BX][1]             ;Get Offset value from table
  437.                Mov    CL,[BX][3]             ;Get Length value from table
  438.                Xor    CH,CH                  ;Convert to word
  439.                Mov    BX,SI                  ;Save Command line pointer
  440.                Mov    SI,OFFSET SysBuffer    ;Point to PCBOARD.SYS Buffer
  441.                Add    SI,AX                  ;Add Offset
  442. VarCopy:       Lodsb                         ;Get Character
  443.                Or     AL,AL                  ;Is it a Zero
  444.                Jnz    CopyIt                 ;No,
  445.                Or     AL,ASCIIZ$             ;Yes, Is ASCIIZ$ = 0
  446.                Jz     CopyDone               ;     Yes, Done
  447. CopyIt:        Stosb                         ;     No,  Copy it
  448.                Loop   VarCopy                ;Loop till Done
  449. ;               Rep    Movsb                  ;Copy Variable to Buffer
  450. CopyDone:      Mov    SI,BX                  ;Restore Command line pointer
  451.                Pop    BX                     ;Restore Comment$ Pointer to BX
  452.                Jmp    Stuff_It               ; Now stuff the data in Comment$
  453. NoSub:         Pop    BX                     ;Restore Comment$ Pointer to BX
  454.                Jmp    S4                     ;Just store the character
  455.  
  456. ;--------------------------------;
  457. ; This subroutine will parse     ;
  458. ; leading and delimiting spaces. ;
  459. ;--------------------------------;
  460.  
  461. Space:         Inc    SI                     ;Point to next byte
  462.                Cmp    BYTE PTR [SI],' '      ;Is it space?
  463.                Jz     Space                  ;If no, get next byte
  464.                Ret                           ; else, return.
  465.  
  466. ;----------------------------;
  467. ; This subroutine will check ;
  468. ; for delimiter characters.  ;
  469. ;----------------------------;
  470.  
  471. Delimiter:     Push   AX
  472.                Mov    AL,[SI]
  473.                Clc                           ;Assume not delimiter.
  474.                Cmp    AL,' '                 ;Is it space
  475.                Jz     Set_Carry
  476.                Cmp    AL,CR                  ; or carriage return
  477.                Jz     Set_Carry
  478.                Cmp    AL,','                 ; or comma?
  479.                Jz     Set_Carry
  480.                Cmp    AL,';'                 ; or semi-colon?
  481.                Jz     Set_Carry
  482.                Cmp    AL,Switch              ; or Switch?
  483.                Jnz    Return                 ;If no, return else, indicate
  484. Set_Carry:     Stc                           ; by setting carry flag
  485. Return:        Pop    AX
  486.                Ret                           ; and return.
  487.  
  488. ;----------------------------;
  489. ; This subroutine will fill  ;
  490. ; the buffer with *'s.       ;
  491. ;----------------------------;
  492.  
  493. Do_Close:      Mov    DI,Offset DatBuffer    ;Point to Buffer for this
  494.                Mov    DX,DI                  ;DX also for Write
  495.                Mov    AL,'*'                 ;Make a line of *'s
  496.                Mov    CX,62                  ;Need 62 of them
  497.                Rep    Stosb                  ;
  498.                Mov    AL,CR                  ;Add a Carriage Return
  499.                Mov    AH,LF                  ;  and Line Feed
  500.                Stosw
  501.                Mov    Close_It,0FFh          ;Turn Off flag or we will be here
  502.                Ret                           ;  forever - and Return
  503.  
  504. ;---------------------------------------;
  505. ; This subroutine will use DOS function ;
  506. ; to print string terminated by Zero.   ;
  507. ;---------------------------------------;
  508.  
  509. DisplayText:   Lodsb                         ;get a character
  510.                Or     AL,AL                  ;End of name
  511.                Jz     DisplayDone            ;Yes, Done
  512.                Mov    DL,AL                  ;No,Print it
  513.                Mov    AH,2                   ;Character Output
  514.                Int    21H
  515.                Jmp    DisplayText            ;Loop until done
  516. DisplayDone:   Ret
  517.  
  518. ;---------------------------------------;
  519. ; This subroutine will read PCBOARD.SYS ;
  520. ; file into a buffer area.              ;
  521. ;---------------------------------------;
  522.  
  523. ReadFile:      Push   DI                     ;
  524.                Push   SI                     ;
  525.                Push   DX                     ;Save message pointer
  526.                Xor    CX,CX              ;Zero Counter for test purposes
  527. NextFlush:     Mov    BX,CX              ;Let's dup the Stdin handle
  528.                Mov    AH,45h             ;service to duplicate a file handle
  529.                Int    21h                ;call DOS to do it
  530.                Jcxz   StartFlush         ;First Time thru
  531.                Jmp    SHORT CloseIt
  532. StartFlush:    Mov    CX,AX              ;copy to CX for counter
  533. CloseIt:       Mov    BX,AX              ;put the new handle into BX
  534. ;               Mov    DX,AX              ;Copy Handle number
  535. ;               Add    DX,3030h           ;Make it Ascii
  536. ;               Mov    AH,2               ;Display Character
  537. ;               Int    21h                ;Let's display the number for testing
  538.                Mov    AH,3Eh             ;and close the "alias" file
  539.                Int    21h                ;call DOS to do it
  540.                Dec    CX                 ;Next Handle
  541.                Cmp    CX,4               ;Did we inherit any files?
  542.                Ja     NextFlush          ;Yes, lets Flush them
  543.                                          ;No, or we went thru them all!
  544. DoneFlushing:  Mov    DI,OFFSET SysBuffer    ;Point to PCBoard.Sys Buffer area
  545.                Push   DI
  546.                Mov    CX,1024                ;Let's fill the whole buffer area
  547.                Mov    AL,'.'                 ;  with '.' characters
  548.                Rep    Stosb                  ;    and do it
  549.                Mov    DX,OFFSET PCBoardSys$  ;Point to Asciiz filename
  550.                Call   CheckFile              ;See if it's present
  551.                Pop    DI
  552.                Mov    CX,128                 ;128 bytes is all we need
  553.                Xor    AX,AX                  ;No Record Seek
  554.                Call   ReadBuffer             ;
  555.                Jc     ReadErr_Hop            ;
  556.                Mov    AL,SysBuffer + 84      ;Get the first character (UserName)
  557.                Cmp    AL, ' '                ;Is it a space?
  558.                Je     NoUser                 ;Yes
  559.                Mov    DX,OFFSET PCBoardDat$  ;Point to Asciiz filename
  560.                Call   CheckFile              ;See if it's present
  561.                Mov    DI,OFFSET DatBuffer    ;Point to PCBoard.Dat Buffer area
  562.                Mov    CX,8000                ;8000 bytes is more than enough
  563.                Xor    AX,AX                  ;No Record Seek
  564.                Call   ReadBuffer
  565. ReadErr_Hop:   Jc     ReadError
  566.                Mov    DI,OFFSET DatBuffer    ;Point to PCBoard.Dat Buffer area
  567.                Mov    CX,8000
  568.                Mov    BX,28                  ;Scan past 28 Lines
  569.                Mov    AL,LF
  570. NextLine:      Repne  Scasb
  571.                Dec    BX
  572.                Jnz    NextLine
  573.                Mov    DX,DI                  ;DX points to filename
  574.                Repne  Scasb                  ;Find End of line
  575.                Dec    DI                     ;back up
  576.                Dec    DI                     ;back up
  577.                Mov    Byte Ptr [DI],0        ;Make ASCIIZ
  578. ;               Push   DX
  579. ;               Mov    SI,DX
  580. ;               Call   DisplayText            ;Lets see that name
  581. ;               Pop    DX
  582.                Mov    DI,OFFSET UserBuffer   ;Point to User File Buffer
  583.                Mov    CX,400                 ;400 Bytes in User Record
  584.                Mov    AX,Word Ptr SYSBuffer+23 ;Get User Record Number
  585.                Or     AX,AX                  ;Test the Record Number
  586.                Jz     NoUser                 ;None present, error
  587.                Push   AX                     ;Save the record Number
  588.                Call   ReadBuffer
  589.                Pop    CX
  590.                Jc     ReadError
  591.                Mov    AH,3EH                 ;Close file
  592.                Int    21H
  593.                Mov    DI,OFFSET UserBuffer+229 ;Point to LastMsgConf
  594.                Mov    SI,OFFSET UserBuffer+87  ;Point SI to Last Date On
  595.                Mov    AX,CX                  ;Get Record Number
  596.                Call   TransferInt2           ;Copy Integer
  597.                Call   TransferDate           ;Copy Date (DI=DI+8, SI=SI+6)
  598.                Add    SI,8                   ;Point to Last Scan Date
  599.                Call   TransferDate           ;Copy Date (DI=DI+8, SI=SI+6)
  600.                Call   TransferChr            ;Copy Chr$(Seclevel)
  601.                Call   TransferInt            ;Copy Integer (TimesOn)
  602.                Add    SI,73                  ;Point to Minutes On
  603.                Call   TransferInt            ;Copy Integer (Minutes On)
  604.                Call   TransferDate           ;Copy Date (DI=DI+8, SI=SI+6)
  605.                Call   TransferChr            ;Copy Chr$(ExpSecLevel)
  606.                Mov    AX,Word Ptr SYSBuffer+109 ;Get Time Remaining
  607.                Call   TransferInt2           ;Copy Integer
  608.                Mov    SI,OFFSET UserBuffer   ;Point SI to UserName
  609.                Call   TransferFile           ;Make it a FileName
  610.                Pop    DX                     ;Restore message pointer
  611.                Clc                           ;Indicate No Error
  612.                Jmp    SHORT ReadError2       ;
  613. NoUser:        Mov    DX, OFFSET NoUser$     ;No user Online!
  614.                Stc
  615. ReadError:     Pop    AX                     ;Forget message pointer
  616. ReadError2:    Pop    SI
  617.                Pop    DI
  618.                Ret
  619.  
  620. ;---------------------------------------;
  621. ; Transfer UserName to FileName         ;
  622. ;---------------------------------------;
  623.  
  624. TransferFile:  Mov    BL,'.'      ; We need a '.', then a 0h
  625.                Mov    BH,' '      ; First we need to find space
  626.                Mov    AH,254      ; Flag shows we are in FileName, then Ext.
  627.                Mov    CX,8        ; Eight Characters Max
  628.                Mov    DX,25       ; UserName is 25 characters long
  629. Next_Char:     Lodsb              ; Read a Char
  630.                Dec    DX          ; Count it
  631.                Call   CheckChar   ; Check for bad characters
  632.                Cmp    AL,BH       ; Is it a Space?
  633.                Jne    Not_Space   ; No, continue then
  634.                Inc    AH          ; Yes, Show we found a Space
  635. Do_Dot:        Mov    AL,BL       ; Yes, Time for the '.' or 0h
  636. Not_Space:     Stosb              ; Store the character
  637.                Cmp    AL,BL       ; Was it a '.'?
  638.                Je     Extension   ; Yes
  639.                Loop   Next_Char   ; No, then loop till all 8
  640.                Jmp    Do_Dot      ; And now we need a Dot
  641. Extension:     Or     BL,BL       ; Are we Done (BL = 0)?
  642.                Jz     FileDone    ; Yes, Bye-bye
  643.                Xor    BL,BL       ; Zero to BL
  644.                Inc    AH          ; No, Did we find a Space already?
  645.                Jz     Skip_Scan   ; Yes, then No need for scan!
  646.                Mov    CX,DX       ; No, Get Characters remaining in UserName
  647.                Xchg   SI,DI       ; Scasb needs ES:DI (but we want to scan SI)
  648.                Mov    AL,BH       ; Scan for a Space
  649.                Repne  Scasb       ; Do the scan
  650.                Xchg   SI,DI       ; Restore SI & DI (SI past the SPACE!)
  651.                Jne    End_File    ; Sorry, no Space found, end the name
  652.                Inc    AH          ; AH = 0 (else we exit!)
  653. Skip_Scan:     Mov    CX,3        ; Three characters MAX for extension
  654.                Jz     Next_Char   ; Back we go for the extension
  655. End_File:      Mov    [DI],BL     ; There isn't one, end the FileName here
  656. FileDone:      Ret
  657.  
  658. CheckChar:     Cmp    AL,BH       ; Space is OK
  659.                Je     Char_Ok
  660.                Cmp    AL,BH       ; '.' or 0h is OK
  661.                Je     Char_Ok
  662.                Cmp    AL,'0'      ; Ctrl-Chars !"#$%'&()*+,-./ are no good
  663.                Jb     Bad_Char
  664.                Cmp    AL,'9'      ; 0-9 are OK
  665.                Jbe    Char_Ok
  666.                Cmp    AL,'A'      ; ;:<=>? are no good
  667.                Jb     Bad_Char
  668.                Cmp    AL,'Z'      ; A-Z are OK
  669.                Jbe    Char_Ok     ; Anything else is no good
  670. Bad_Char:      Mov    AL,'$'      ; Replace all bad characters with '$'
  671. Char_Ok:       Ret
  672.  
  673. ;---------------------------------------;
  674. ; Transfer Date from yymmdd to mm-dd-yy ;
  675. ;---------------------------------------;
  676.  
  677. TransferDate:  Mov    BL,'-'
  678.                Lodsw              ; Read Year
  679.                Movsw              ; Copy Month
  680.                Mov    [DI],BL     ; Write '-'
  681.                Inc    DI
  682.                Movsw              ; Copy Day
  683.                Mov    [DI],BL     ; Write '-'
  684.                Inc    DI
  685.                Stosw              ; Write year
  686.                Ret
  687.  
  688. ;------------------------------------------;
  689. ; This subroutine will converts a byte     ;
  690. ; into ascii text                          ;
  691. ;------------------------------------------;
  692.  
  693. TransferChr:   Lodsb                  ;Read the Chr
  694.                Xor    AH,AH           ;force upper byte to zero
  695.                Mov    DX,3            ;We want 3 characters
  696.                Jmp    SHORT TI2
  697.  
  698. ;------------------------------------------;
  699. ; This subroutine will converts an integer ;
  700. ; into ascii text                          ;
  701. ;------------------------------------------;
  702.  
  703. TransferInt:   Lodsw                  ;Read the integer
  704. TransferInt2:  Mov    DX,5            ;We want 5 characters
  705. TI2:           Push   BX              ;Save register
  706.                Mov    BL,10           ;for division by 10
  707.                Xor    CX,CX           ;set count to zero
  708. Divide:        Push   DX              ;save register
  709.                Xor    DX,DX           ;perform word divide
  710.                Xor    BH,BH           ;  to avoid divide overflow
  711.                Div    BX              ;return quotient in AX
  712.                Mov    BH,DL           ;return remainder in BH
  713.                Pop    DX
  714.                Push   BX              ;build our number on the stack
  715.                Inc    CX              ;keep count of them
  716.                Or     AX,AX           ;All done? (remainder = 0)
  717.                Jnz    Divide          ;No, Keep dividing
  718.                Mov    AH,"0"          ;prepare for ASCII translation
  719. Write_it:      Pop    BX              ;get a remainder off the stack
  720.                Mov    AL,BH           ;put remainder in AL
  721.                Add    AL,AH           ;convert to ASCII
  722.                Stosb                  ;write digit to end of string
  723.                Dec    DX              ;decrement desired count
  724.                Loop   Write_it        ;pop all of them off of stack
  725.                Mov    CX,DX           ;Remaining Count to CX
  726.                Pop    BX              ;Retore register
  727.  
  728.                Jcxz   PadDone         ;No padding needed
  729.                Xor    AL,AL           ;Load Zero
  730.                Rep    Stosb           ;Pad remainder
  731. PadDone:       Ret                    ;All Done!
  732.  
  733.  
  734. ;-------------------------------------------;
  735. ; DX Points to ASCIIZ Filename              ;
  736. ;                                           ;
  737. ; Check to see if file in current directory ;
  738. ; or at %PCBDRIVE%%PCBDIR% from environment ;
  739. ;-------------------------------------------;
  740.  
  741. CheckFile:     Push   DX              ;Save filename pointer
  742.                Mov    AX,3D40H        ;Open file for reading.
  743.                Int    21H
  744.                Jc     CheckError      ;Error if Carry Set
  745.                Mov    AX,BX           ;Copy handle of open file
  746.                Mov    AH,3Eh          ;and close it.
  747.                Int    21H
  748.                Jnc    CheckDone       ;OK, File exists
  749. CheckError:    Cmp    AX,2            ;File Not Found?
  750.                Jne    CheckDone       ;Exit if anything else
  751.                Mov    BX,OFFSET UserBuffer
  752.                Pop    SI              ;Get filename pointer
  753.                Push   BX              ;Save Buffer Address instead
  754.                Push   SI              ;Now save filename pointer
  755.                Mov    DX,OFFSET PCBDrive
  756.                Mov    BP,LenPCBDrive
  757.                Call   Copy_Env        ;Findit & Copy it
  758.                Mov    DX,OFFSET PCBDir
  759.                Mov    BP,LenPCBDir
  760.                Call   Copy_Env        ;Findit & Copy it
  761.                Pop    SI              ;Get back filename pointer
  762.                Mov    AL,'\'          ;Append a '\' (if needed)
  763.                Cmp    [DI-1],AL       ;Is there one already?
  764.                Je     No_Slash        ;Yes,
  765.                Stosb                  ;No,  so add one.
  766. No_Slash:      Call   Copy_ASCIIZ     ;And Copy it
  767.                Stosb                  ; And terminate it with a Zero
  768. ;               Pop    SI              ;Get the buffer address
  769. ;               Push   SI              ; put it back on the stack
  770. ;               Call   DisplayText     ; Now, Lets see that name!
  771. CheckDone:     Pop    DX              ;Get Filename pointer or buffer address.
  772.                Ret
  773.  
  774. ;------------------------------------------------------;
  775. ; On Entry:                                            ;
  776. ;    BX Points to Destination Buffer                   ;
  777. ;    DX points to Target String to find in Environment ;
  778. ;    BP Contains length of Target String               ;
  779. ; On Exit:                                             ;
  780. ;    BX adjusted to next character to write in Buffer  ;
  781. ;    DI is same as BX (All other Regs altered)         ;
  782. ;------------------------------------------------------;
  783.  
  784. Copy_Env:      Mov    AX,CS:[2Ch]       ;Point ES to Environment
  785.                Mov    ES,AX             ;
  786.                Xor    DI,DI             ;Start of Environment (ES:DI)
  787.                Xor    AX,AX             ;
  788. Next_Env:      Mov    CX,BP             ;Get length.
  789.                Mov    SI,DX             ;Get Target pointer
  790.                Rep    Cmpsb             ;Do we have a match? (DS:SI) = (ES:DI)
  791.                Je     FoundMatch        ;Yes, Found it
  792.                Dec    DI                ;No,  It didn't match, back up one
  793.                Mov    CX,-1             ;
  794.                Repne  Scasb             ;Find the end of this one (ES:DI)
  795.                Cmp    ES:[DI],AL        ;Is this the last one?
  796.                Jne    Next_Env          ;No, Do the next one.
  797.                Mov    DI,BX             ;Point DI to Buffer also
  798.                Je     Copy_Exit         ;Yes, No Copy
  799.  
  800. FoundMatch:    Mov    AX,ES             ;Point DS to Env Segment
  801.                Mov    DS,AX             ;
  802.                Mov    AX,CS             ; and ES back to Program Data Segment
  803.                Mov    ES,AX             ;
  804.                Mov    SI,DI             ;Point SI to variable value
  805.                Mov    DI,BX             ;Point DI to Buffer
  806.  
  807. Copy_ASCIIZ:   Xor    AL,AL             ;We need to copy up to the 0h
  808. Copy_Next:     Cmp    [SI],AL           ;Is this the end?
  809.                Je     Copy_Done         ;Yes,
  810.                Movsb                    ;No, Copy it (ES:DI) <= (DS:SI)
  811.                Jne    Copy_Next         ;Keep going
  812. Copy_Done:     Mov    BX,DI             ;Update BX
  813. Copy_Exit:     Mov    DX,CS             ;Make sure DS points to
  814.                Mov    DS,DX             ;  Code Segment again.
  815.                Mov    ES,DX             ;  and ES too!
  816.                Ret                      ;
  817.  
  818. ;--------------------------------;
  819. ; DX Points to ASCIIZ Filename   ;
  820. ; DI Points to Buffer Area       ;
  821. ; CX Contains Length to read     ;
  822. ; AX Contains Record Number or 0 ;
  823. ; Carry set if error             ;
  824. ;--------------------------------;
  825.  
  826. ReadBuffer:    Mov    SI,DX                  ;Save filename pointer (for disp)
  827.                Push   AX                     ;Save Record Number (if any)
  828.                Mov    AX,3D40H               ;Open file for reading.
  829.                Int    21H
  830.                Pop    BX                     ;Restore Record Number (to BX)
  831.                Jc     FileError              ;Error if Carry Set
  832.                Xchg   AX,BX                  ;Copy handle of open file
  833.                Or     AX,AX                  ;Random Record Seek?
  834.                Jz     No_Seek                ;No,
  835.                Push   CX
  836.                Dec    AX
  837.                Mul    CX                     ;Yes, CX=Length, AX=Record Number
  838.                                              ;Now DX:AX = Seek (Save Length)
  839.                Mov    CX,AX                  ;Now DX:CX
  840.                Xchg   CX,DX                  ;Now CX:DX
  841.                Mov    AX,4200H               ;Seek
  842.                Int    21H
  843.                Pop    CX                     ;Restore Length
  844.                Jc     FileError              ;Error if Carry Set
  845. No_Seek:       Mov    DX,DI                  ;Point to buffer
  846.                Mov    AH,3FH                 ;Read from handle
  847.                Int    21H
  848.                Jc     FileError              ;Error if Carry Set
  849.                Mov    AH,3EH                 ;Close file
  850.                Int    21H
  851.                Jc     FileError
  852.                Ret                           ;All done
  853. FileError:     Push   AX                     ;Save error code
  854.                Call   DisplayText            ;Display the filename
  855.  
  856. ;For trouble shooting error codes use the following
  857.  
  858. ;               Mov    DL,' '
  859. ;               Mov    AH,2                   ;Character Output
  860. ;               Int    21H
  861. ;               Mov    DL,'('
  862. ;               Mov    AH,2                   ;Character Output
  863. ;               Int    21H
  864. ;               Mov    DL,BL
  865. ;               Add    DL,30h
  866. ;               Mov    AH,2                   ;Character Output
  867. ;               Int    21H
  868. ;               Mov    DL,')'
  869. ;               Mov    AH,2                   ;Character Output
  870. ;               Int    21H
  871.                Pop     AX                    ;Get error code
  872.                Call    File_Error            ;Translate it
  873.                Stc                           ;Indicate the error
  874.                Ret
  875.  
  876. SUB_TABLE              LABEL BYTE
  877.                DB     'F',  25, 0, 15          ; First Name (Proper Case)
  878.                DB     '?',  40, 0, 12          ; Password
  879.                DB     'G',  56, 0,  5          ; Time User logged On
  880.                DB     'Z',  80, 0,  4          ; Language Extension
  881.                DB     'N',  84, 0, 25          ; User Full Name
  882.                DB     '*', 146, 1,  5          ; Time Remaining (from 109)
  883.                DB     'V', 112, 0,  5          ; Event Time
  884.                DB     'C', 153, 0, 24          ; City, State
  885.                DB     'B', 189, 0, 13          ; Bus/Data Phone
  886.                DB     'H', 202, 0, 13          ; Home/Voice Phone
  887.                DB     'D', 106, 1,  8          ; Last Date On (from 215)
  888.                DB     'T', 221, 0,  5          ; Last Time On
  889.                DB     '!', 226, 0,  1          ; Expert Mode (Y or N)
  890.                DB     'P', 227, 0,  1          ; Default Protocol
  891.                DB     'L', 114, 1,  8          ; Last Dir Scan (from 229)
  892.                DB     'A', 122, 1,  3          ; Sec Level Access (from 235)
  893.                DB     '#', 125, 1,  5          ; Number of Times On (from 236)
  894.                DB     'M', 130, 1,  5          ; TimeSpent last call (from 311)
  895.                DB     'E', 135, 1,  8          ; Expiration Date  (from 313)
  896.                DB     'X', 143, 1,  3          ; Expiration Sec Level (from 319)
  897.                DB     'U', 251, 0, 30          ; User Maintained Comment
  898.                DB     'S',  25, 1, 30          ; Sysop Maintained Comment
  899.                DB     'R', 101, 1,  5          ; Record Number
  900.                DB     '=', 151, 1, 13          ; First.Last
  901.                DB     '$', 101, 1, 63          ; Translated Data
  902.  
  903. Table_End      DB     0    ; 528 DUP ('.')     ;PCBoard.Sys reads in here
  904. SysBuffer      EQU    Table_End + 1
  905.  
  906. ;    0 Display AS STRING * 2   'Display On/Off ("-1" = On, " 0" = Off)
  907. ;    2 Printer AS STRING * 2   'Printer On/Off ("-1" = On, " 0" = Off)
  908. ;    4 PageBell AS STRING * 2  'Page Bell On/Off ("-1" = On, " 0" = Off)
  909. ;    6 CallAlarm AS STRING * 2 'Caller Alarm On/Off ("-1" = On, " 0" = Off)
  910. ;    8 SysopFlag AS STRING * 1 'Sysop Flag (" ", "N"=sysop next, "X"=exit dos)
  911. ;    9 ErrCorr AS STRING * 2   'Error Corrected ("-1" = On, " 0" = Off)
  912. ;   11 Graphics AS STRING * 1  'Graphics Mode ('Y'=yes, 'N'=no, '7'=7E1)
  913. ;   12 NodeChat AS STRING * 1  'Node Chat Status ('A'=available, 'U'=unavailable)
  914. ;   13 DTEPort  AS STRING * 5  'DTE Port Speed (PC to Modem speed)
  915. ;   18 Connect  AS STRING * 5  'Connect Speed shown to caller or "Local"
  916. ;|  23 RecNum   AS INTEGER     'User's Record Number in the USERS file
  917. ;|  25 FirstName AS STRING * 15 'User's First Name (padded to 15 characters)
  918. ;|  40 Password AS STRING * 12 'User's Password (padded to 12 characters)
  919. ;   52 TimeOn   AS INTEGER     'Time User Logged On (in minutes since midnight)
  920. ;   54 TimeUsed AS INTEGER     'Time used so far today (negative number of minutes)
  921. ;|  56 TimeOnF  AS STRING * 5  'Time User Logged On (in "HH:MM" format)
  922. ;   61 DayTime  AS INTEGER     'Time Allowed On (from PWRD file)
  923. ;   63 DLKbytes AS INTEGER     'Allowed K-Bytes for Download
  924. ;   65 ConfArea AS STRING * 1  'Conference Area user was in (if <= 255)
  925. ;   66 ConfJoined AS STRING * 5 'Conference Areas the user has joined this session
  926. ;   71 ConfScaned AS STRING * 5 'Conference Areas the user has scanned this session
  927. ;   76 ConfAddTime AS INTEGER  'Conference Add Time in minutes
  928. ;   78 CreditTime AS INTEGER   'Upload/Sysop CHAT Credit Minutes
  929. ;|  80 LangExt AS STRING * 4   'Language Extension
  930. ;|  84 UserName AS STRING * 25 'User's Full Name (padded to 25 characters)
  931. ;| 109 MinRemain AS INTEGER    'Calculated Minutes Remaining
  932. ;  111 NodeNum AS STRING * 1   'Node Number (or ' ' if no network)     CHR$()
  933. ;| 112 EventTime AS STRING * 5 'Scheduled Event Time (in "HH:MM" format)
  934. ;  117 EventOn AS STRING * 2   'Is Event Active ("-1" = On, " 0" = Off)
  935. ;  119 EventSlide AS STRING * 2 'Slide Event ("-1" = On, " 0" = Off)
  936. ;  121 MemMesg AS STRING * 4   'Memorized Message Number               MKSMBF$()
  937. ;  125 ComPort AS STRING * 1   'Comm Port Number (0=none, 1-8)
  938. ;  126 Reserved1 AS STRING * 1 'Reserved for PCBoard
  939. ;  127 Reserved2 AS STRING * 1 'Reserved for PCBoard
  940.  
  941. UserBuffer     EQU    SysBuffer+128            ;Users record reads in here
  942.  
  943. ;| 128 UserName AS STRING * 25      'First name and Last name
  944. ;| 153 CityState AS STRING * 24     'City and State
  945. ;  177 Password AS STRING * 12      'Password
  946. ;| 189 BusPhone AS STRING * 13      'Business Phone Number
  947. ;| 202 HomePhone AS STRING * 13     'Home Phone Number
  948. ;| 215 LastOnDate AS STRING * 6     'Last Date on system (in yymmdd format)
  949. ;| 221 LastOnTime AS STRING * 5     'Last Time on system (in hh:mm format)
  950. ;| 226 Expert AS STRING * 1         'Expert Mode - "Y" or "N"
  951. ;| 227 Protocol AS STRING * 1       'Protocol
  952. ;  228 PackedFlags AS STRING * 1    'Dirty, ClrScrn, HasMail, DontAsk, Editor
  953. ;| 229 LastDirScan AS STRING * 6    'Last date looked at directory (in yymmdd format)
  954. ;| 235 SecLevel AS STRING * 1       'Security Level CHR$(X)
  955. ;| 236 TimesOn AS INTEGER           'Number of times on the system
  956. ;  238 PageLength AS STRING * 1     'Page Length CHR$(X)
  957. ;  239 Uploads AS INTEGER           'Number of Uploads
  958. ;  241 Downloads AS INTEGER         'Number of Downloads
  959. ;  243 DailyDlBytes AS STRING * 8   'Daily Download Bytes so far
  960. ;| 251 UserComment AS STRING * 30   'User Maintained Comment
  961. ;| 281 SysopComment AS STRING * 30  'Sysop Maintained Comment
  962. ;| 311 TimeSpent AS INTEGER         'Elapsed Time on system on last date called
  963. ;| 313 SubDate AS STRING * 6        'Subscription Registration Date (yymmdd format)
  964. ;| 319 ExpSecLevel AS STRING * 1    'Subscription Expired Security Level CHR$(X)
  965. ;  320 LastConference AS STRING * 1 'Last Conference left - CHR$(X) - 255 = Ext.
  966. ;  321 AreaReg AS STRING * 5        'Area Registration Info (1-39) BitMap
  967. ;  326 ExpAreaReg AS STRING * 5     'Expired Area Registration Info (1-39) BitMap
  968. ;  331 UserScanArea AS STRING * 5   'User Message Scan Areas (1-39) BitMap
  969. ;  336 TotalDownloads AS STRING * 8 'Total Bytes Download - all calls
  970. ;  344 TotalUploads AS STRING * 8   'Total Bytes Upload - all calls
  971. ;  352 Delete AS STRING * 1         'Positive Delete Flag to Delete User (Repack)
  972. ;  353 LastMsgMain AS STRING * 4    'Last message read in Main Board     MKSMBF$()
  973. ;  357 LastMsgConf AS STRING * 156  'Last message read in Conferences 39 * 4  "
  974. ;                                   ' (Gets overwritten by 3 date conversions)
  975. ;                                   ' ( & numeric conversions)
  976. ;  513 InfPointer AS LONG           'Pointer into USERS.INF record
  977. ;  517 Space2 AS STRING * 9         'Reserved
  978. ;  526 ExtLastConference AS INTEGER 'Last Conference Left (If LastConf.$ = 255)
  979.  
  980. DatBuffer      EQU    UserBuffer+400           ;PCBoard.Dat read in here
  981.                                                ;and we buffer or conversions.
  982.  
  983. CODE ENDS
  984. END  Start
  985.